 "use strict";
/**
 * @author zhaojiuyi
 * @date 2022/9/18-21:21
 * @version 1.0.0
 */

import {post,get} from '../util/requests/requests';

/*用户接口*/
export default {
  login(loginData) {
    return post({
      url: '/login/user',
      params: loginData,
    })
  },
  register(registerData) {
    return post({
      url: '/register/registerByTel',
      noJson:true,
      params: registerData
    })
  },
  logOut(){
    return post({
      url: '/login/logOut'
    })
  },
  getVerCode(phoneNumber) {
    return post({
      url: '/captcha/sendSmsCaptcha',
      noJson: true,
      params: {
        tel: phoneNumber
      }
    })
  },
  getUserInfo(){
    return post({
      url:'/patient/getSelfInfo'
    })
  },
  reviseUserInfo(userInfo){
    return post({
      url:'/patient/updateSelfInfo',
      noJson: true,
      params: userInfo
    })
  },
  /*获取用户病历列表*/
  getUserMediaList() {
    return post({
      url: '/patientRecords/getRecordsByPage',
      params: {
        "pageNo": 1,
        "pageSize": 10
      }
    })
  },
  getMediaInfo(id){
    return post({
      url: '/patientRecords/viewMedicalRecord',
      noJson: true,
      params:{
        id
      }
    })
  },
  reportError(id,remark) {
    return post({
      url: '/patientRecords/proposedChanges',
      noJson: true,
      params:{
        id,
        remark
      }
    })
  },
}
